<template>
  <!-- Activity 活动管理 -->
  <FullLoading :full-loading="!isOnLoad" />
  <ActivityMain v-if="isOnLoad" />
</template>

<script lang="ts" setup>
  import ActivityMain from '@/components/ActivityMain/index.vue';
  import { onPageScroll, onShareAppMessage } from '@dcloudio/uni-app';
  import { onLoad } from '@/router';
  import { ref } from 'vue';
  import FullLoading from '@/components/FullLoading/index.vue';
  import { useAppShare } from '@/hooks/core/useAppShare';
  import { useAppStore } from '@/store/modules/app';

  const isOnLoad = ref(false);
  onLoad(() => {
    isOnLoad.value = true;
  });

  const { setWxSharePath } = useAppShare();

  onShareAppMessage(() => {
    return {
      imageUrl: useAppStore().globalConfig?.comShareOptions.shareImg,
      path: setWxSharePath({
        name: 'activity',
        options: {},
      }),
      title: '活动',
    };
  });

  onPageScroll(() => {});
</script>
<style lang="scss" scoped></style>
